<?php
session_start();
include('database.php');



if(isset($_GET[email]))
{
$_SESSION[email]=$_GET[email];
header('Location: index.php?active=reset&#page_three');
}else if(isset($_POST[reset_password1]))
{
$md5 = md5($_POST[reset_password1]);
$query ="update users set password='$md5' where email='$_SESSION[email]'";
$mysqli->query($query) or die($mysqli->error.__LINE__);

header('Location: index.php?update=success');

}
?>